package com.course.common.model.pojo;

import com.course.common.model.base.BaseModel;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @PROJECT_NAME: course
 * @DESCRIPTION: 抢购代金券信息
 * @Author: 涂玄武
 * @DATE: 2021/6/25 9:38
 */
public class SeckillVouchers extends BaseModel {

    /**
     * 代金券外键
     */
    private Integer fkVoucherId;

    /**
     * 数量
     */
    private int amount;

    /**
     * 抢购开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    private Date startTime;

    /**
     * 抢购结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    private Date endTime;

    public Integer getFkVoucherId() {
        return fkVoucherId;
    }

    public void setFkVoucherId(Integer fkVoucherId) {
        this.fkVoucherId = fkVoucherId;
    }

    public int getAmount() {
        return amount;
    }

    public void setAmount(int amount) {
        this.amount = amount;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("SeckillVouchers{");
        sb.append("fkVoucherId=").append(fkVoucherId);
        sb.append(", amount=").append(amount);
        sb.append(", startTime=").append(startTime);
        sb.append(", endTime=").append(endTime);
        sb.append('}');
        return sb.toString();
    }
}
